package com.tzq.CLASS;

import com.tzq.JAVABEAN.ConnectDB;

public class UpdateClickTimes {
	
	public void BlogClickTimes(String authorid,String blogname){
		String SqlParam[] = new String[2];
		SqlParam[0] = authorid;
		SqlParam[1] = blogname;
		String exesql = "update Blog set ClickTimes=ClickTimes+1 where AuthorID=? and BlogName=?";
		int[] WhichInt = { 1, 0 };
		ConnectDB connectDB = new ConnectDB();
		connectDB.updatesql(exesql, SqlParam, 2, WhichInt);
		
	}
	public void ImageAlbumClickTimes(String userid,String album){
		String SqlParam[] = new String[2];
		SqlParam[0] = userid;
		SqlParam[1] = album;
		String exesql = "update ImageAlbum set ClickTimes=ClickTimes+1 where UserID=? and AlbumName=?";
		int[] WhichInt = { 1, 0 };
		ConnectDB connectDB = new ConnectDB();
		connectDB.updatesql(exesql, SqlParam, 2, WhichInt);
	}
	
	public void ImageClickTimes(String UploaderID , String ServerImageName){
		String SqlParam[] = new String[2];
		SqlParam[0] = UploaderID;
		SqlParam[1] = ServerImageName;
		String exesql = "update Images set ClickTimes=ClickTimes+1 where UploaderID=? and ServerImageName=?";
		int[] WhichInt = { 1, 0 };
		ConnectDB connectDB = new ConnectDB();
		connectDB.updatesql(exesql, SqlParam, 2, WhichInt);
	}
	   
	public void VideoClickTimes(String a) {
		
	}
	
}
